import { defineStore } from "pinia";
import { ref } from "vue";
export default useCarStore = defineStore("car", {
  state: () => {
    return {
      carList: ref([1, 2, 3]),
    };
  },
  actions: {
    addCar(car) {
      this.carList.push(car);
    },
    delCar(car) {
      this.carList.splice(this.carList.indexOf(car), 1);
    },
  },
  persist: true,
});
